

// 文本项接口
export interface TextItem {
    id: string;
    text: string;
    [key: string]: any; // 允许添加其他属性
}

// 图片项接口
export interface ImageItem {
    id: string;
    url: string;
    [key: string]: any; // 允许添加其他属性
}

// 设计数据 fabricJSON
export type FabricJSON = { objects: Array<any>, version?: string, background?: `#${string}` };

// 商品组
export type GoodsGroup = {
    goods_group_id: number,
    parent_id: number,
    sort: number,
    name: string,
    enable: boolean,
    icon: string,
    goods_number: number,
}

// 图库组
export type StickerGroup = {
    sticker_group_id: number,
    parent_id: number,
    sort: number,
    name: string,
    disable: number
}

// 图库数据
export type StickerData = {
    createBy: string;
    createTime: string;
    ifShow: boolean;
    imageUrl: string;
    materialCategoryId: number;
    materialId: number;
    materialName: string;
    materialSort: number;
    pageNum: number;
    pageSize: number;
    params: {};
    searchValue: string;
    updateBy: string;
    updateTime: string;
}

// 背景数据
export type BackgroundData = {
    createBy: string;
    createTime: string;
    ifShow: boolean;
    imageUrl: string;
    materialCategoryId: number;
    materialId: number;
    materialName: string;
    materialSort: number;
    pageNum: number;
    pageSize: number;
    params: {};
    searchValue: string;
    updateBy: string;
    updateTime: string;
}

//设计模板组
export type DesignTemplateGroup = {
    design_template_group_id: number,
    parent_id: number,
    sort: number,
    name: string,
    disable: number
}

// 设计模版数据
export type DesignTemplateDate = {
    design_template_id: number,
    sort: number,
    design_data: { [key: string]: any },
    thumb: string;
    name: string;
    disable: 0 | 1
}

//设计数据
export type DesignData = {
    disable: number,
    goods_id: string,
    group_id: string,
    id: string,
    name: string,
    design_data: { [key: string]: FabricJSON },
    thumb: string,
    back_thumb: string,
    color: `#${string}`
}

// 购物车数据
export type ShopCarData = {
    color: string;
    createTime: string;
    id: number;
    ifDel: boolean;
    ifPinkage: string;
    materialLength: number;
    openId: string;
    designName: string;
    pagePrice: number;
    productDesign: GoodsData["productData"];
    productDesignId: number;
    productId: number;
    productIfDel: boolean;
    productIfPutaway: boolean;
    productName: string;
    productNegativeId: number;
    productNegativeIfDel: boolean;
    productNegativeIfPutaway: boolean;
    productNumber: number;
    productShowImageUrl: string;
    sizeRecommendImageUrl: string;
    size: string;
    underlinePrice: number;
    updateTime: string;
    utStyleNum: string;
    weight: number;
}

//库存对象
export type InventoryItem = {
    inventory_id: number; // '库存id',
    goods_id: string; // '商品id',
    size: string; // '商品尺码',
    color: string; // '商品颜色',
    color_name: string; // '商品颜色中文',
    number: number; // '库存数量',
    goods_name: string; // '商品名称',
    goods_thumb: string; // '商品缩率图',
};

//统计数据
export type StatistData = {
    id: string;
    year: number; // 年
    month: number; // 月
    day: number; // 日
    new_order: number; // 新增订单
    pay_order: number; // 支付订单
    sales_volume: number; // 衣服总数
    income: number; // 总收入(不包括运费)
    new_design: number; // 新增设计
    active_user: number; // 活跃用户
};

//用户上传的图片
export type MyPhotoData = {
    createTime: string;
    id: number;
    name: string;
    picPath: string;
    updateTime: string;
    userId: number;
};

//名字号码
export type NameNum = {
    name: string;
    num: string;
    size: string;
};

//名字号码支持的面
export type NameNumSide =
    | 'front' // 前片
    | 'back' // 后片
    | 'left_front' //左前片
    | 'right_front' // 有前片
    | 'left_back' // 左后片
    | 'right_back'; //右后片



// 角色数据结构
export type RoleData = {
    admin: boolean; // 是否为管理员
    createBy: string; // 创建人
    createTime: string; // 创建时间
    dataScope: string; // 数据范围
    delFlag: "0" | "1"; // 删除标志，0: 正常, 1: 删除
    deptCheckStrictly: boolean; // 部门数据权限是否严格
    deptIds: Array<number> | null; // 部门 ID 列表
    flag: boolean; // 标志位
    menuCheckStrictly: boolean; // 菜单数据权限是否严格
    menuIds: Array<number> | null; // 菜单 ID 列表
    params: Record<string, any>; // 额外参数
    permissions: string; // 权限标识
    remark: string; // 备注
    roleId: number; // 角色 ID
    roleKey: string; // 角色标识
    roleName: string; // 角色名称
    roleSort: string; // 角色排序
    searchValue: string; // 搜索值
    status: "0" | "1"; // 状态，0: 启用, 1: 禁用
    updateBy: string; // 更新人
    updateTime: string; // 更新时间
};

// 管理员数据
export type AdminData = {
    admin: boolean; // 是否为管理员
    createBy: string; // 创建人
    createTime: string; // 创建时间
    dataScope: string; // 数据范围
    delFlag: "0" | "1"; // 删除标志，0: 正常, 1: 删除
    deptCheckStrictly: boolean; // 部门数据权限是否严格
    deptIds: Array<number> | null; // 部门 ID 列表
    flag: boolean; // 标志位
    key: number; // 唯一标识
    menuCheckStrictly: boolean; // 菜单数据权限是否严格
    menuIds: Array<number> | null; // 菜单 ID 列表
    params: Record<string, any>; // 额外参数
    permissions: string; // 权限标识
    remark: string; // 备注
    roleId: number; // 角色 ID
    roleKey: string; // 角色标识
    roleName: string; // 角色名称
    roleSort: string; // 角色排序
    searchValue: string; // 搜索值
    status: "0" | "1"; // 状态，0: 启用, 1: 禁用
    updateBy: string; // 更新人
    updateTime: string; // 更新时间
};

// 菜单管理
export type MenuData = {
    searchValue?: string;
    createBy?: string;
    createTime: string;
    updateBy?: string;
    updateTime?: string;
    params: Record<string, any>;
    menuId: number;
    menuName: string;
    parentName?: string;
    parentId: number;
    orderNum: number;
    path: string;
    component?: string;
    query: string;
    isFrame: string;
    isCache: string;
    menuType: string;
    visible: number;
    status: number;
    perms: string;
    icon: string;
    children?: Array<MenuData>;
    rightList?: Array<MenuData>;
    remark?: string;
}

// 用户权限路由
export type UserRouter = {
    name: string,
    path: string,
    hidden: false,
    redirect: string,
    component: string,
    alwaysShow: true,
    meta: {
        title: string,
        icon: string,
        noCache: false,
        link: null
    },
    children?: Array<UserRouter>
}

// 商品分类
export type GoodsCategoryData = {
    id: number;
    typeName: string;
    level: number;
    productNumber?: number;
    parentId: number;
    parentName: string;
    status: number;
    typeIcon: string;
    typeDescribe?: string;
    orderNum: number;
    del: boolean;
}

// 底版数据
export type GoodsBaseData = {
    productNegativeId: number; // 商品底版ID
    ifPutaway: boolean;       // 底班上架开关
    negativeName: string;     // 底版名称
    productTypeId: number;    // 底版分类ID
    sort: number;             // 排序
    suitFor: string;   // 适用人群
    supplier: string;         // 供应商
    supplierStyleNum: string; // 供应商款号
    utStyleNum: string;       // UT款号
    secondaryCraftName: string; // "升华" | "烫画" | "直喷"; 工艺名称
    weight: number;           // 重量
    material: string;         // 面料 100%棉, 100%涤纶,55%棉35%涤纶
    materialTexture: string;  // 面料材质
    materialWeight: number;   // 面料克重 g
    materialLength: number;   // 面料门幅 mm
    data: {
        thumbs: Array<string>, // 商品缩率图
        size_info: string, // 尺码信息图片
        goods_dateils: string, // 商品详情富文本
        model_url: string,     // 模型文件的地址
        mockup_urls: Array<string>; // 商品的上身效果
        mini_program_model_url: string;//这个模型是优化过并且没有压缩过的,微信小程序专用的
        mini_program_mockup_urls: Array<string>; ///这个模型是优化过并且没有压缩过的,微信小程序专用的
        components: Array<{
            enable: boolean, // 是否上架
            lock: boolean, // 锁定
            key: string,
            icon: string, // 图标
            hover_icon: string, //鼠标移入的图标
            name: string,
            camera_position?: { x: number, y: number, z: number }, // 相机的观察位置

            print_area_top: number, // 打印区域上面单位是mm
            print_area_left: number, // 打印区域左面单位是mm
            print_area_width: number, // 打印区域宽度单位是mm
            print_area_height: number, // 打印区域高度单位是mm

            clip_print_area_top: number, // 裁剪打印区域上面单位是mm
            clip_print_area_left: number, // 裁剪打印区域左面单位是mm
            clip_print_area_width: number, // 裁剪打印区域宽度单位是mm
            clip_print_area_height: number, // 裁剪打印区域高度单位是mm

            uv_freeSize: string,   // 均码轮廓
            uv_110: string,   // 110尺码轮廓
            uv_120: string,   // 120尺码轮廓
            uv_130: string,   // 130尺码轮廓
            uv_140: string,   // 140尺码轮廓
            uv_150: string,   // 150尺码轮廓
            uv_160: string,   // 160尺码轮廓

            uv_3XS: string,   // 3XS尺码轮廓
            uv_2XS: string,   // 2XS尺码轮廓
            uv_XS: string,    // XS尺码轮廓
            uv_S: string,     // S尺码轮廓
            uv_M: string,     // M尺码轮廓
            uv_L: string,     // L尺码轮廓
            uv_XL: string,    // XL尺码轮廓
            uv_2XL: string,   // 2XL尺码轮廓
            uv_3XL: string,   // 3XL尺码轮廓
            uv_4XL: string,   // 4XL尺码轮廓
            uv_5XL: string,   // 5XL尺码轮廓
            uv_6XL: string,   // 6XL尺码轮廓
            uv_7XL: string,   // 7XL尺码轮廓
            uv_8XL: string,   // 8XL尺码轮廓
            uv_9XL: string,   // 9XL尺码轮廓
            uv_10XL: string   // 10XL尺码轮廓

            //小程序真机不能加载svg,所以需要提前准备这4张图片
            oulineMark: string; // 用于轮廓裁剪图
            designMark: string; // 用于设计裁剪图
            outlineDash: string; // 轮廓虚线图(带有裁剪区域的虚线图)
            printlineDash: string; // 打印区域虚线图

        }>; // 部位的数据
        // 模型的尺码 用于编辑时能更加准确的贴图
        model_size: "freeSize" | "110" | "120" | "130" | "140" | "150" | "160" | "3XS" | "2XS" | "XS" | "S" | "M" | "L" | "XL" | "2XL" | "3XL" | "4XL" | "5XL" | "6XL" | "7XL" | "8XL" | "9XL" | "10XL",
        sizes: Array<{
            enable: boolean, // 是否上架
            lock: boolean, // 锁定
            name: string,
            width: number,
            height: number,
            printLayout: any,
        }>; // 尺码的数据
        colors: Array<{
            mockup_urls?: Array<string>; // 商品的上身效果
            mini_program_mockup_urls?: Array<string>; ///这个模型是优化过并且没有压缩过的,微信小程序专用的
            color: `#${string}`,
            frontImg?: string; // 正面图
            backImg?: string; // 背面图
            en?: string,
            cn?: string,
        }>, // 商品可选颜色
    }
}

// 商品SKU数据
export type SkuData = {
    costPrice: number | null;          // 成本价
    ifDefault: boolean;                // 是否默认SKU
    ifEnable: boolean;                 // 是否启用
    ifUnlimitedStock: boolean;        // 是否无限库存
    pagePrice: number;                 // 页面售价
    productId: number;                 // 商品ID
    productName: string | null;        // 商品名称
    searchValue: string | null;        // 搜索关键词
    skuCode: string;                   // SKU编码
    skuId: number;                     // SKU唯一ID
    skuImageUrl: string;               // SKU图片地址
    sort: number;                      // 排序值
    specCode: string | null;           // 规格编码
    specId: number;                    // 规格ID
    specName: string;                  // 规格名称
    specValue: string | null;          // 规格值
    stock: number;                     // 库存数量
    underlinePrice: number;            // 划线价（市场价）
}


// 商品数据
export type GoodsData = {
    ifCollect: boolean, // 是否收藏
    ifPutaway: boolean,   // 商品上架开关
    productName: string,   // 商品名称
    productRemark: string, // 商品描述
    productSort: number,               // 排序
    productTypeId: number, // 商品分类，传ID

    productSetName?: string, // 多商品时的名字
    childrens?: Array<GoodsData>, // 子商品
    salesCount: number, // 销售量
    productNegativeId: number,     // 底版ID
    pagePrice: number,       // 页面价格
    skuList: Array<SkuData>, // 商品SKU列表
    underlinePrice: number, // 下划价格
    ifShowBorder: boolean,   // 是否展示边框
    borderImageUrl: string,   // 边框图片
    productShowImageUrl: string,   // 商品展示图
    sizeRecommendImageUrl: string, // 尺码推荐图
    ifPinkage: string,    // 是否包邮
    protection: string  // 服务保障        
    createBy: string;
    createTime: string;
    ifDel: boolean;
    params: Record<string, any>;
    productId: number; // 商品ID
    productNegativeName: string;
    productTypeName: string;
    searchValue: null | any;
    updateBy: string;
    updateTime: string;
    sysSlideshows: Array<string>,
    productData: {
        color: string,
        colorValue: `#${string}`,
        colorThumbs?: Array<{ cn?: string, en?: string, fontThumbImg: string, backThumbImg: string }>,
        designName: string,
        designData: { [key: string]: FabricJSON },
        previewThumb: Array<string>,
        thumbs: Array<string | undefined>,
        designThumbs?: Array<string>, // 前后片的设计图
        printArea: 'front' | 'back' | 'double',
        threadColor: `#${string}`,

        // 多商品时才会有的参数
        productId: number; // 商品ID
        productNegativeId: number,     // 底版ID
        designsName?: string, // 多商品时的名字
        childrens?: Array<GoodsData["productData"]>, // 子商品

    }
}

//历史设计数据
export type DesignHistoryData = {
    id: number,
    date: number,
    designDataId: string,
    diffKey: Array<string>,
    designData: { [key: string]: Object },
    color: `#${string}`
}


// 平铺类型              不平铺         基础平铺        镜像平铺           横向平铺              纵向平铺
export type RepeatType = "no_repeat" | "base_repeat" | "mirror_repeat" | "horizontal_repeat" | "vertical_repeat";


//图片文件夹
export type Folder = {
    id: number,
    name: string,
    count: number
}

// '订单状态             全部    待支付           待发货           已发货        已收货     订单关闭
export type OrderState = "" | "WAIT_PAY" | "WAIT_DELIVERY" | "DELIVERED" | "RECEIVED" | "CLOSED";

// 主订单数据
export type OrderData = {
    actualPrice: number;
    childrenList: Array<{
        color: string;
        createTime: string;
        id: number;
        openId: string;
        orderCodeChildren: string;
        orderCodeMain: string;
        productDesign: GoodsData["productData"];
        productName: string;
        productNumber: number;
        productPrice: number;
        productShowImageUrl: string;
        size: string;
        totalPrice: number;
        utStyleNum: string;
    }>,
    couponPrice: number;
    couponedPrice: number;
    deliveryCode: string;
    deliveryName: string;
    deliveryPrice: number;
    id: number;
    openId: string;
    orderCodeMain: string;
    orderRemark: string;
    orderState: OrderState;
    orderTime: string;
    packagePrice: number;
    payChannel: string;
    platformPrice: number;
    prepayId: string;
    receiveAddress: string;
    receiveName: string;
    receivePhone: string;
}


// 未打印订单的搜索条件(后台管理系统使用)
export type DownloadSearchParam = Partial<{
    page: number,
    pageSize: number,
    supplier: string, // 供应商
    material_name: string, // 面料,
    material: string, // 面料材质,
    secondaryCraftName: string, //二次工艺名称,
    fabric_door_width: string, // 面料门幅,
}>

// 制作中未打印订单的搜索的可选条件
export type DownloadSearchOptions = {
    supplier: Array<{ label: string, value: string, num: number }>, // 供应商
    material_name: Array<{ label: string, value: string, num: number }>, // 面料,
    material: Array<{ label: string, value: string, num: number }>, // 面料材质,
    secondaryCraftName: Array<{ label: string, value: string, num: number }>, //二次工艺名称,
    fabric_door_width: Array<{ label: string, value: string, num: number }>, // 面料门幅,
}

//收货地址数据
export type ReceiveAddress = {
    appAddressId: number,          // id
    userName: string,           // 收货人姓名
    postalCode: string,         // 邮编
    province: string,           // 省
    city: string,               // 市
    county: string,             // 区
    detail: string,             // 详细地址
    nationalCode: string,       // 国家码
    phone: string,              // 手机号码
    ifDefault: boolean          // 是否默认地址
}


// 用户的数据格式
export type User = {
    user_id: string,    // '用户id',
    user_name: string,    // '用户名',
    email: string,    // '用户的邮箱,  可以使用邮箱登录',
    user_checkCode: string,    // '用户验证码',
    sessionId: string,    // '记录当前用户是否多设备登录，唯一值',
    create_time: string,    // '账号创建时间',
    disable: number,    // '是否禁用，1是正常，0是禁用（删除）',
    job: string,    // '职务',
    compony: string,    // '公司名称',
    phone: string,    // '手机号码',
    avator: string,    // '头像地址',
    is_root: number,    // '是否是管理员(1是管理员,0是员工)',
    sex: string,    // '性别',
    checkCodeCreateTime: string,    // '创建验证码时间，用于判断是否过期',
    user_password: string,    // '后台管理界面登录账号',
    disign_ids: string,    // '我的设计的id',
    collect_sticker_ids: string,    // '收藏的图库ids',
    collect_template_ids: string,    // '收藏的模版ids',
    goods_address_ids: string,    // '收货地址',
    order_ids: string,    // '所有订单',
    image_folder_ids: string,    // '用户图片组的ids',
    collect_goods_ids: string,    // '收藏商品的ids',
    shop_car_ids: string,    // '购物车内的商品ids',
    wx_openid: string,    // '微信用户的 授权id',
    role: number,    // '角色;  0:管理员 1:设计师 2:普通用户',
}

// 遮罩数据
export type MaskData = {
    createBy: string;
    createTime: string;
    ifDel: number;
    params: Record<string, any>;
    searchValue: string;
    status: any;
    svgData: string;
    svgFileUrl: string;
    svgId: number;
    svgImageUrl: string;
    svgName: string;
    svgSort: number;
    svgType: string;
    updateBy: string;
    updateTime: string;
}

//我的设计数据
export type MyDesignData = {
    color: string;
    createTime: string;
    id: number;
    ifDel: boolean;
    openId: string;
    pagePrice: number;
    productDesign: GoodsData["productData"],
    productId: number;
    productIfDel: boolean;
    productIfPutaway: boolean;
    designName: string;
    productName: string;
    productNegativeId: number;
    productNegativeIfDel: boolean;
    productNegativeIfPutaway: boolean;
    productShowImageUrl: string;
    size: string;
    underlinePrice: number;
    updateTime: string;
    utStyleNum: string;
}

// OssToken
export type OssToken = {
    dir: string;
    host: string;
    policy: string;
    security_token: string;
    signature: string;
    version: string;
    x_oss_credential: string;
    x_oss_date: string;
}


// 设计模版组
export type TemplateGroupData = {
    children?: Array<TemplateGroupData>;
    createBy: string;
    createTime: string;
    groupLevel: number;
    groupName: string;
    groupSort: number;
    params: Record<string, any>;
    parentId: number;
    searchValue: string;
    templateGroupId: number;
    updateBy: string;
    updateTime: string;
}

//小程序装修数据
export type MiniProgramDecorateData = {
    //全局配置ID
    globalConfigId: number;
    //分类页面高级定制
    ifCategoryPageHighLevelCustom: boolean;
    //展示商品分类
    ifGoodsCategoryShow: boolean;
    //展示热门商品
    ifHotGoodsShow: boolean;
    // 是否开启ai生图
    ifAiImageGeneration: boolean;
    // 商品排序
    productSort: Array<GoodsData>;
    ifBusinessCooperation: boolean; // 是否开启合作业务
    //轮播图列表
    sysSlideshows: Array<{ skipAddr: string; slideshowUrl: string; }>
}

// 价格带详情
export type PriceZoneDetail = {
    end: string;
    start: string;
}

// 轮播图数据
export type SysSlideshow = {
    //跳转地址
    skipAddr: string;
    //轮播图地址
    slideshowUrl: string;
}

// 字典配置
export type PropertyData = {
    id: number,
    title: string; // "material",
    detail: Array<string>; // "[\"100%棉\",\"100%涤纶\",\"55%棉\",\"35%涤纶\",\"50%棉 100%涤纶\"]",
}

// 区域
export type AreaData = {
    code: number;
    id: number;
    inChina: boolean;
    level: number;
    name: string;
    parentId: number;
    parentName: string;
    children?: AreaData[];   // 子区域数组
}


// 运费模版
export type ShippingCost = {
    distributionModeId: number; // 配送方式ID
    areaIds: string | Array<number>; // 配送区域ID, 多个逗号分开
    advancedPackingExpense: number; // 高级礼盒包装费
    arriveDayNum: number; // 到达天数
    commonPackingExpense: number; // 普通礼盒包装费
    continueRepeatCharge: number; // 续重收费
    continueRepeatCost: number; // 续重成本费用
    continueRepeatStandard: number; // 续重标准
    firstWeightCharge: number; // 首重收费
    firstWeightCost: number; // 首重成本费用
    firstWeightStandard: number; // 首重标准
    freightTemplateId: number; // 运费模板ID
    ifDel: boolean; // 是否删除
    params: any; // 参数
    searchValue: string; // 搜索值
    updateBy: string; // 更新人
    updateTime: string; // 更新时间
    createBy: string; // 创建人
    createTime: string; // 创建时间
}

// 素材
export type MaterialData = {
    createBy: string;
    createTime: string;
    ifShow: boolean;
    imageUrl: string;
    materialCategoryId: number;
    materialId: number;
    materialName: string;
    materialSort: number;
    pageNum: number;
    pageSize: number;
    params: {};
    searchValue: string;
    updateBy: string;
    updateTime: string;
}


// 配送方式
export type DistributionModeData = {
    companyName: string,
    distributionModeId: number
}

// 用户标签
export type UserLabelItem = {
    url: string;
    title: string;
    key: string;
}



// 提现数据
export type WithdrawalData = {
    id: number, //提现记录id
    businessCode: string, //交易号
    openId: string, //openid
    phoneNumber: string, //用户电话
    cashOutMoney: number, //提现金额
    remainMoney: number, //余额
    businessType: string, //交易类型
    zfbAccount: string, //zhifubao名称
    zfbPhone: string, //zhifubao电话
    applyTime: string, //申请时间
    //申请状态 WAIT_CHECK-待审核,CASH_OUTING-提现中,CHECK_FAIL-审核失败,CASH_OUT_SUCCESS-提现成功,CASH_OUT_FAIL-提现失败    updateTime: string, //更新时间
    applyState: 'WAIT_CHECK' | 'CASH_OUTING' | 'CHECK_FAIL' | 'CASH_OUT_SUCCESS' | 'CASH_OUT_FAIL';
    failReason: string, //失败原因
    successPicture: string //成功截图

}


// 设计模版
export type TemplateData = {
    createBy: string;
    createTime: string;
    designData: FabricJSON;
    ifShow: boolean;
    imageUrl: string;
    params: Record<string, any>;
    searchValue: string;
    templateGroupId: number;
    templateGroupName: string;
    templateId: number;
    templateName: string;
    templateSort: number;
    updateBy: string;
    updateTime: string;
}

// 素材分组
export type MaterialCategoryData = {
    categoryLevel: number;
    categoryName: string;
    categorySort: number;
    children?: Array<MaterialCategoryData>;
    createBy: string;
    createTime: string;
    materialCategoryId: number;
    params: {};
    parentId: number;
    searchValue?: string;
    updateBy: string;
    updateTime: string;
}

// 字体
export type FontData = {
    createBy: string;
    createTime: string;
    fontFileUrl: string;
    fontId: number;
    fontImageUrl: string;
    fontName: string;
    fontSort: number;
    fontType: string;
    ifDel: boolean;
    params: {};
    searchValue: string;
    status: boolean;
    updateBy: string;
    updateTime: string;
}

// 用户信息
export type UserData = {
    id: number;
    userName: string; //昵称
    phoneNumber: string; //用户绑定的手机号（国外手机号会有区号）
    purePhoneNumber: string; //没有区号的手机号
    countryCode: string; //区号
    email: string; //邮箱
    openId: string; //小程序id
    profilePicture: string; //头像
    firstParentOpenid: string; //一级上级id
    secondParentOpenid: string; //二级上级id
    createTime: string; //创建时间
    hasChildren: boolean; //是否包含下级
    money: string; //余额
    incomeMoney: string; //收益金额
    cashoutMoney: string; //提现金额
    costMoney: string; //消费金额
    linkTime: string; //关联时间
    sex: boolean; //性别 false为男 true为女
    userType: string; //用户类别
    birth: string; //生日
    promotionCode: string; //分享码
}


// 分享信息
export type PromotionData = {
    id: number; //用户id
    userName: string; //昵称
    phoneNumber: string; //手机号
    purePhoneNumber: string;
    countryCode: string;
    email: string; //邮箱
    openId: string; //openid
    profilePicture: string; //头像
    firstParentOpenid: string; //一级上级openid
    secondParentOpenid: string; //二级上级openid
    createTime: string; //创建时间
    hasChildren: boolean; //是否参与分享 false-否
    money: number; //余额
    incomeMoney: number; //收益金额
    cashoutMoney: number; //提现金额
    costMoney: number; //消费金额
    linkTime: string; //关联时间
    promotionTotal: number; //分享人数
    firstPromotionTotal: number; //一级分享人数
    secondPromotionTotal: number; //二级分享人数
    sex: boolean; //性别 false-男 true-女
    userType: string; //用户类别
    birth: string; //生日
    promotionCode: string; //分享码
    remarkName: string; //备注名
}


// 收益记录
export type IncomeData = {

    createTime: string;
    encryptPhone: string;
    openId: string;
    id: number; //用户id
    businessCode: string; //交易号
    orderCodeMain: string; //主订单编号
    orderPrice: number; //订单金额
    fundType: "PLACE_ORDER" | "FIRST_PROMOTION" | "SECOND_PROMOTION"; //收益类型 PLACE_ORDER-下单，FIRST_PROMOTION-一级分享，SECOND_PROMOTION-二级分享
    fundRate: number; //收益比例
    fundPrice: number; //收益金额
    fundState: "WAIT_SETTLE" | "SETTLING" | "SETTLED" | "SETTLE_CANCEL"; //收益状态 WAIT_SETTLE-待结算，SETTLING-结算中，SETTLED-结算完成
    fundOpenid: string; //收益openid
    updateTime: string; //更新时间
    userId: number; //用户id
    remarkName: string; //备注名
    userName: string; //昵称

}

// 价格带数据
export type PriceZoneData = {
    min: number; //最小价格
    max: number; //最大价格
}


// 优惠券数据结构
export interface CouponItem {
    couponCode: string;
    couponGetRecordId: number;
    couponName: string;
    couponCreateRecordId: number;
    createBy: string;
    createTime: string;
    expireTime: string;
    openid: string;
    params: Record<string, any>;
    searchValue: null | unknown;
    serialNumber: null | unknown;
    state: "未使用" | "已使用" | "已过期";
    updateBy: string;
    transferState: string,
    updateTime: string;
    couponPrice: number;
    usePrice: number;
}